package net.oschina.app.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;

import java.util.List;

/**
 * Created by Ethan on 2017/4/1.
 */

public class NewsPagerAdapter extends ViewPagerAdapter {
    private List<String> mListTitle;
    public NewsPagerAdapter(FragmentManager fm, List<Fragment> listFragment, List<String>
            listTitle) {
        super(fm,listFragment);
        this.mListTitle=listTitle;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mListTitle.get(position%mListTitle.size());
    }
}
